package com.itheima.info.manager.controller;

import com.itheima.info.manager.domain.Student;
import com.itheima.info.manager.service.StudentService;

import java.util.Scanner;

public abstract class StudentController extends BaseStudentController {
    Scanner scanner = new Scanner(System.in);

    public abstract Student inputStudentInfo(String s_id) ;

    private String inputStudentId() {
        String s_id;
        while (true) {
            System.out.print("请输入学生学号：");
            s_id = scanner.next();
            boolean exists = studentService.isExists(s_id);
            if (!exists) {
                System.out.println("学号不存在，请重新输入");
            } else {
                break;
            }
        }
        return s_id;
    }


}
